﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MetaCollection.Framework.Model;

namespace MetaCollection.Framework.Change
{
	/// <summary>
	/// A specific change to be applied to an item. 
	/// </summary>
	public interface IItemChange
	{
		/// <summary>
		/// Gets the changes.
		/// </summary>
		/// <value>a list of itemchanges</value>
		IList<IItemChange> Changes { get; }
		/// <summary>
		/// Gets the type of the change.
		/// </summary>
		/// <value>The type of the change.</value>
		ItemChangeTypes ChangeType { get; }
		/// <summary>
		/// Reverts this change.
		/// </summary>
		void Revert();
		/// <summary>
		/// Applies this change to a given item instance
		/// </summary>
		/// <param name="item">the instance to apply the change to</param>
		void ApplyTo(IItemInstance item);
		/// <summary>
		/// Gets the name of the property associated with this change.
		/// </summary>
		/// <value>The name of the property.</value>
		string PropertyName { get; }
		/// <summary>
		/// Gets the description.
		/// </summary>
		/// <value>The description of this item change.</value>
		string Description { get; }
	}
}
